<%@ page pageEncoding="UTF-8" %>
<%@ page import="java.util.*,jp.co.technotree.common.util.*" %>
<jsp:useBean id="formBean" class="jp.co.technotree.apl.cmd.tytlin.Awlin1000Bean" scope="request" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String userId = formBean.getUserId();
	if (userId == null) {
		userId="";
	}
	String message = formBean.getMessage();
	if (message == null) {
		message="";
	}

%>
<html>
	<head>
		<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=UTF-8'>
		<meta http-equiv="Content-Script-Type" content="text/javascript">
		<meta http-equiv="Content-Style-Type" content="text/css">
		<link rel="SHORTCUT ICON" href="jsp/common/img/default/sys_icon.ico">
		<link rel='stylesheet' type='text/css' href='../../common/css/common/base.css' >
		<link rel='stylesheet' type='text/css' href='../../common/css/common/common.css'>

		<link rel='stylesheet' type='text/css' href='../../common/css/menu/menu.css'>

		<link rel='stylesheet' type='text/css' href='../../common/css/login/awlin.css'>

		<style type='text/css'>
			.menu-img-rlist2000 {
				background:		url(../../common/img/menu/line.png) no-repeat;
			}
		</style>
		<script src="../../common/js/menu/topmenu.js"></script>
		<script src="../../common/js/systemlog.js"></script>
		<style type="text/css">
		<!--
		input.txt{
		  background-color:#ffd;
		  width:140px;
		  color:#0f0;
		}
		-->
		</style>

		<script TYPE="text/javascript">
		history.forward();

		function onInit(){
			var strId = document.getElementById("userId").value = CookieRead("id");
			var strPass = document.getElementById("password").value = CookieRead("pass");
			var strChk = document.getElementById("cookie").checked = CookieRead("check");
		}

		function CookieWrite(kword, kdata, kday) {
			if(!navigator.cookieEnabled){
				//alert("クッキーへの書き込みができません");
				return;
			}
			sday = new Date();
			sday.setTime(sday.getTime() + (kday * 1000 * 60 * 60 * 24));
			s2day = sday.toGMTString();
			document.cookie = kword + "=" + escape(kdata) + ";expires=" + s2day;
		}

		//
		function CookieRead(kword){
			if(typeof(kword) == "undefined") return "";
			kword = kword + "=";
			kdata = "";
			scookie = document.cookie + ";";
			start = scookie.indexOf(kword);
			if (start != -1){
				end = scookie.indexOf(";", start);
				kdata = unescape(scookie.substring(start + kword.length, end));
			}
			return kdata;
		}

		function CookieDelete(kword) {
			document.cookie = kword + "=;expires=Thu,01-Jan-70 00:00:01 GMT";
		}

		function loginAction(){
			var frm = document.forms["F1"];
			var chk = document.getElementById("cookie").checked;
			//
			if(chk){
				var strId = document.getElementById("userId").value;
				var strPass = document.getElementById("password").value;
				var strCheck = document.getElementById("cookie").checked;

				CookieWrite("id",strId,1);
				CookieWrite("pass",strPass,1);
				CookieWrite("check",strCheck,1);
			}else{
				CookieDelete("id");
				CookieDelete("pass");
				CookieDelete("check");
			}
			frm.submit();
		}
		function screen_back() {
		//	location.href="../topmenu/top1000.fw";
		}

		</script>
	</head>
	<body onLoad="javaScript:onInit();" style="margin: 0px 4px 0px 0px;">
		<form name="F1" id="F1" action="./awlin1100" method="post" class="frmMain">
			<table class="tblMain" width="100%" cellspacing="0" cellpadding="0" border="0">
				<tr height="100%">
					<td width="100%" valign="top">
						<table class='main-width-tb'  cellspacing='0' cellpadding='0' border='0'><tr><td></td></tr></table>
						<table class='main-height-tb' cellspacing='0' cellpadding='0' border='0'><tr><td></td></tr></table>

						<!-- Header Menu START -->
						<jsp:include page="jsp/common/headermenu.jsp"></jsp:include>
						<!-- Header Menu END -->

						<div id="lc-out">
							<div id="lc-in">
								<div id="lc-cc" style='width: 100%; border: solid 0px;'>
									<div id="lc-cc-in" style='width: 100%; border: solid 0px; text-align: center;'>


										<!-- ********* ログイン画面開始 ********* -->
										<div class="login_info">
											ご利用者の[ログインID]と[パスワード]を入力後、[ログイン]ボタンをクリックして下さい。<br>
											※ログインID・パスワードともに、半角英数で入力して下さい。<br>
											※ログイン情報を保存するには、Cookieを有効にして下さい。
										</div>
										<div class="login_input" align="center">
											<TABLE BORDER=0 width="384" height="200" style="background-image:url(../../common/img/default/login.png);color:#000; background-repeat: no-repeat;">
												<TR>
													<TD colspan="3" height="40" style="text-align: center;"><div style="margin-top:28px;"><img src="../../common/img/menu/cname.gif" ></div></TD>
												</TR>
												<TR>
													<TD colspan="3" height="40" style="font-size: 20px; text-align: center;"><div  style="margin-top:-10px;">システム名前</div></TD>
												</TR>
												<TR>
													<TD width="110" align="right">ログインID:</TD>
													<TD colspan="2" align="left"><INPUT type="text" id="userId" NAME="userId" class="userid" value="<%=userId%>"></TD>
												</TR>
												<TR>
													<TD width="110" align="right">パスワード:</TD>
													<TD align="left"><INPUT TYPE="password" id="password" NAME="password" class="password" value=""></TD>
													<TD height="44">
														<input type="submit" name="loginBtn" value="ログイン" class="login" onClick="loginAction();">
													</TD>
												</TR>
												<TR>
													<TD></TD>
													<TD colspan="3" align="left"><input type="checkbox" id="cookie" name="cookie" ><label for="cookie">ログイン情報を保存する</label></input></TD>
												</TR>
											</TABLE>
											<br>
											<div><font color="red"><%= message  %></font></div>

										</div>
										<div class="login_help">

											※[ログインID]と[パスワード]をお忘れになった場合には、管理者までご連絡ください。
										</div>
										<!-- ********* ログイン画面開始 ********* -->


									</div>
								</div>
							</div>
						</div>
					</td>
				</tr>
			</table>
			<input type="hidden" name="cmd" value="login">
		</form>
	</body>
</html>
